<include file="Common:header" />
<!-- /. NAV SIDE  -->
<include file="Common:left" />
<style>
	.goodcss1{
		white-space:nowrap;
	}
	.goodsimgcss{
		width:50px;
	}
	.avatarurl{
		width:30px;
		border-radius:50%;
      height: 30px;
	}
	.fontcssgreen{
		color:#009688
	}
	.fontcssred{
		color:#f36a5a
	}
	.commissioncss{
		line-height:21px;
	}
</style>
<!-- /. NAV SIDE  -->
<div id="page-wrapper">
	<div class="header">
		<h1 class="page-header">
			定制订单管理 <small>Welcome {$Think.config.system_tag}</small>
		</h1>
		<ol class="breadcrumb">
			<li><a href="{:U('Index/index')}">首页</a></li>
			<li class="active">订单列表</li>
			<div style="float:right"></div>
		</ol> 
	</div>
	<div id="page-inner">
		<div class="row">
			<div class="col-xs-12">
				<!--Search content-->
				<div class="panel panel-default" style="margin-bottom:0px; border-bottom:none">
					<div class="panel-body">
						<form class="layui-form" action="{:U('Custom/customOrderList')}" method="post">
							<div class="layui-form-item">
								<label class="layui-form-label" style="width:auto;">订单号</label>
								<div class="layui-input-inline">
									<input value="{$filter.order_id}" type="text" name="order_id" placeholder="请输入订单号" autocomplete="off" class="layui-input">
								</div>
								<label class="layui-form-label" style="width:auto;">用户名</label>
								<div class="layui-input-inline">
									<input value="{$filter.user_name}" type="text" name="user_name" placeholder="请输入用户名" autocomplete="off" class="layui-input">
								</div>
								<label class="layui-form-label" style="width:auto;">状态</label>
								<div class="layui-input-inline">
									<select name="status" lay-verify="">
										<option value="">请选择</option>
										<notempty name="orderStatusList">
											<volist name="orderStatusList" id="vo">
												<option value="{$vo.value}" <if condition="($filter['status'] eq $vo['value'])">selected</if>>{$vo.name}</option>
											</volist>
										</notempty>
									</select>
								</div>
							</div>
                            <div class="layui-form-item">
								<label class="layui-form-label" style="width:auto;">下单时间</label>
								<div class="layui-input-inline">
									<input id="addtime_fromdate" value="{$filter.addtime_fromdate}" type="text" name="addtime_fromdate" placeholder="请输入下单起始时间" autocomplete="off" class="layui-input">
								</div>
								<div class="layui-input-inline">
									<input id="addtime_todate" value="{$filter.addtime_todate}" type="text" name="addtime_todate" placeholder="请输入下单结束时间" autocomplete="off" class="layui-input">
								</div>
								<div class="layui-input-inline" style="width:auto;">
									<button type="submit" class="btn btn-default">搜索</button>
								</div>
							</div>
						</form>
					</div>
				</div>
				<!--Search content-->
				<!--Formlist content-->
				<div class="panel panel-default">
					<div class="panel-body">
						<div class="table-responsive">
							<table class="table table-hover">
								<thead>
									<tr>
										<th class="goodcss1">订单号</th>
                                        <th class="goodcss1">所属用户</th>
										<th class="goodcss1">姓名</th>
										<th class="goodcss1">手机号</th>
                                        <th class="goodcss1">肩宽</th>
                                        <th class="goodcss1">胸围</th>
                                        <th class="goodcss1">腰围</th>
                                        <th class="goodcss1">衣长</th>
										<th class="goodcss1">订单状态</th>
										<th class="goodcss1">下单时间</th>
										<th class="goodcss1">操作</th>
									</tr>
								</thead>
								<tbody>
									<volist name="list" id="vo">
										<tr>
											<td class="goodcss1">{$vo.order_no}</td>
											<td class="goodcss1">{$vo.username}</td>
											<td class="goodcss1">{$vo.name}</td>
											<td class="goodcss1">{$vo.mobile}</td>
                                            <td class="goodcss1">{$vo.shoulder}</td>
                                            <td class="goodcss1">{$vo.chest}</td>
                                            <td class="goodcss1">{$vo.waist}</td>
                                            <td class="goodcss1">{$vo.garment}</td>
											<td class="goodcss1">
											    <if condition="$vo['status'] eq 0">
											        进行中
											    <elseif condition="$vo['status'] eq 1" />
											        已完成
											    <elseif condition="$vo['status'] eq 2" />
											        已取消
											    </if>
											</td>
											<td class="goodcss1">{$vo['addtime']}</td>
											<td class="goodcss1">
												<button class="layui-btn layui-btn-xs" onclick="openlayer('订单详情','{:U(\'Custom/customOrderDetail\',array(\'id\'=>$vo[\'id\']))}');return false;">详</button>
												<if condition="$vo['status'] eq 0">
												    <a href="#" class="layui-btn layui-btn-xs layui-btn-normal" onclick="if(confirm('确认完成吗？')){ajaxBox('{:U(\'Custom/completeOrder\',array(\'id\'=>$vo[\'id\']))}')}return false;">完成订单</a>
                                                    <a href="#" class="layui-btn layui-btn-danger layui-btn-xs layui-btn-normal" onclick="if(confirm('确定要取消吗？')){ajaxBox('{:U(\'Custom/cancelOrder\',array(\'id\'=>$vo[\'id\']))}')}return false;">取消订单</a>
												</if>
											</td>
										</tr>
									</volist>
								</tbody>
							</table>
							{$page}
						</div>
					</div>
				</div>
				<!--Formlist content-->
			</div>
		</div>
	</div>
	<include file="Common:foot" />
	<script>
		layui.use('form', function(){
		  var form = layui.form;
		});
	</script>
	 <!-- /. PAGE INNER  -->
</div>
<include file="Common:footer" />
    